<!DOCTYPE html>
<html>
 <head>
  <meta charset="UTF-8">
  <title></title>
 <script src="../4.29  js/3.js"></script>
 <script>
   function $$(id) {
    return document.getElementById(id);
   }   
   window.onload=function(){
    var cnv = $$("canvas");
    var cxt = cnv.getContext("2d");
    
    var x=0;
    (function frame(){
     window.requestAnimationFrame(frame);
     cxt.clearRect(0,0,cnv.width,cnv.height);
    
     cxt.beginPath();
     cxt.arc(x,70,20,0,360*Math.PI/180,true);
     cxt.closePath();
     cxt.fillStyle="#6699FF";
     cxt.fill();
     
     x+=2;
    })();
   } 
 </script>
</head>
 <body>
  <canvas id="canvas" width="200" height="150" style="border: 1px solid silver;"></canvas>
 </body>
<ml>